<?php

require_once 'connexion_bdd.php';
// connection bdd SELECT
session_start();

$connexion = connect_db();

$requete_prepare=$connexion->prepare("
	SELECT id
	FROM informations
	WHERE login = :login
	AND password = :password
"); // on prépare notre requête
$requete_prepare->execute(array(
	'login' => $_POST['login'], 
	'password' => $_POST['password'], 
));
if ($requete_prepare->rowCount(PDO::FETCH_OBJ) > 0)
{
	echo 'LOGIN_OK';
	$_SESSION['user']['login'] = $_POST['login'];
	exit();
}
echo 'LOGIN_NOT_OK';

?>